﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sustainalytics.Reporting.Framework;
using Sustainalytics.RiskRatings.Reporting.Headers_and_Footers;

namespace Sustainalytics.RiskRatings.Reporting
{
    class PdfReportPage_RiskRatingOverview : PdfReportPage
    {
        public PdfReportPage_RiskRatingOverview(PdfReport report, ReportDataSource _datasource, bool isFinalSection) : base(report)
        {
            OverviewPageHeader objHeader = new OverviewPageHeader();
            objHeader.Left = 0;
            objHeader.Top = -9;
            objHeader.Width = report.PageMaxWidth;
            objHeader.Height = 80;
            objHeader.CompanyName = _datasource.CompanyProfile.CompanyName;
            objHeader.SubPeerGroup= _datasource.CompanyProfile.SubPeerGroup;
            objHeader.Country = _datasource.CompanyProfile.Country;
            objHeader.ExchangeTicker = _datasource.CompanyProfile.ExchangeTicker;
            objHeader.UnmanagedRiskValue = (float)_datasource.CompanyProfile.ManagementRisk.UnmanagedRisk.Value;
            objHeader.RiskRatingClusterList = _datasource.OverallClusters;
            objHeader.LastUpdate = _datasource.CompanyProfile.LastUpdate;
            objHeader.Assessment = _datasource.CompanyProfile.Assessment.ToString();
            objHeader.ReportType = _datasource.ReportType;
            objHeader.IsFinalSection = isFinalSection;
            Elements.Add(objHeader);
            Top += 80;
        }
    }
}
